package com.xiaoyi.encrypt;

import com.xiaoyi.annotataion.Encrypt;
import com.xiaoyi.config.EncryptionConfig;
import com.xiaoyi.util.SM3Util;

/**
 *  Sm3 只能加密，不能加密
 *
 * @author xiaoyi
 * @version 1.0.0
 * @date 2023/08/01 15:17:00
 */
public class Sm3Encryptor implements IEncryptorStrategy {

    @Override
    public String encrypt(String value, EncryptionConfig config, Encrypt encrypt) {
        return SM3Util.encrypt(value);
    }

    @Override
    public String decrypt(String value, EncryptionConfig config, Encrypt encrypt) {
        return value;
    }
}
